Skip to content

Run osv-sanner on uv & dart & java - #77

Merged
jayvdb merged 6 commits into
mainfrom
vulns
Jul 11, 2026
Merged

Run osv-sanner on uv & dart & java#77
jayvdb merged 6 commits into
mainfrom
vulns

Conversation

@jayvdb

@jayvdb jayvdb commented Jul 11, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Added unified Python and Dart workspace management for more consistent dependency resolution and lockfile handling.
    • Expanded security scanning across supported ecosystem lockfiles.
    • Updated runtime and build tooling for improved compatibility and reliability.
  • Bug Fixes

    • Applied a patched Rhino version to address a high-CPU security issue.
    • Improved coverage validation and dependency policy checks.
  • Chores

    • Strengthened linting, formatting, and configuration validation.
    • Refined container build exclusions and generated-file handling.

@deepsource-io

deepsource-io Bot commented Jul 11, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in cd6c5bd...882f466 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Coverage  

Code Review Summary

Analyzer Status Updated (UTC) Details
C# Jul 11, 2026 10:16a.m. Review ↗
C & C++ Jul 11, 2026 10:16a.m. Review ↗
Docker Jul 11, 2026 10:16a.m. Review ↗
Java Jul 11, 2026 10:16a.m. Review ↗
JavaScript Jul 11, 2026 10:16a.m. Review ↗
Python Jul 11, 2026 10:16a.m. Review ↗
Rust Jul 11, 2026 10:16a.m. Review ↗
Secrets Jul 11, 2026 10:16a.m. Review ↗
Code coverage Jul 11, 2026 10:36a.m. Review ↗

Code Coverage Summary

Language Line Coverage (New Code) Line Coverage (Overall)
Aggregate
100%
50.6%
Python
100%
54.2%
[▲ up 0.2% from main]
Rust
100%
50.5%

➟ Additional coverage metrics may have been reported. See full coverage report ↗


Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

Comment thread generated/python-ws/et_ws/__init__.py Outdated
Comment thread generated/python-ws/et_ws/__init__.py Outdated
@codacy-production

codacy-production Bot commented Jul 11, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This Pull Request is currently not up to standards according to the Codacy analysis. A major concern is the bundling of infrastructure tooling changes (OSV scanning and workspace consolidation) with major dependency upgrades for Deno and Pyo3; this increased surface area for regressions should ideally be handled in separate PRs to allow for better isolation. Furthermore, the PR description is empty, which is insufficient given the architectural shifts and the critical test scenarios that remain unverified.

About this PR

  • Major dependency upgrades for Deno (0.262.0) and Pyo3 (0.29) are bundled with infrastructure and tooling changes. This increases the surface area for potential regressions and makes it difficult to isolate the cause if a failure occurs. These should ideally be decoupled.
  • The PR description is currently empty. Given that this PR introduces significant architectural changes (consolidating modules into workspaces) and major dependency upgrades (Deno and Pyo3), a detailed description of the changes and the rationale behind them is required for a safe review.

Test suggestions

  • Verify that the osv-scanner task correctly executes and reports vulnerabilities across all four lockfiles (Cargo, uv, Dart, Maven).\n- [ ] Ensure that services/ws-web-runner initializes correctly without errors using the upgraded Deno 0.262.0 runtime and new WorkerOptions.\n- [ ] Validate the no-line-length-in-comment Semgrep rule against a commit containing a comment with the banned '120 chars' string.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify that the `osv-scanner` task correctly executes and reports vulnerabilities across all four lockfiles (Cargo, uv, Dart, Maven).\n- [ ] Ensure that `services/ws-web-runner` initializes correctly without errors using the upgraded Deno 0.262.0 runtime and new WorkerOptions.\n- [ ] Validate the `no-line-length-in-comment` Semgrep rule against a commit containing a comment with the banned '120 chars' string.

TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback

# Do not hardcode the line-length number (from .editorconfig) in a comment; say "editorconfig line length".
# Only mention the constraint when the comment genuinely needs it -- otherwise drop it. Config keys that set the
# value (ruff.toml, .editorconfig, dprint.jsonc) are values, not comments, so this rule only matches comment syntax.
pattern-regex: '(?://|#)[^\n]*\b120[- ]?(?:char|chars|column|columns|width|line|lines|col|cols)\b'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 MEDIUM RISK

Suggestion: The Semgrep rule regex currently only identifies single-line comments (# or //). Since this rule is applied to languages like JavaScript, C, and Java, it should be updated to also detect block comments (/) to ensure the '120-char' hardcoding check is consistent across the codebase.\n\nTry running the following prompt in your IDE agent:\n> Update the pattern-regex in config/semgrep/no-line-length-in-comment.yaml to include the block comment start marker (/) in addition to # and //, as the rule is applied to several languages in the workspace that use block comments.

Comment thread generated/python-ws/et_ws/__init__.py Outdated
"""

from et_ws.messages import * # noqa: F401,F403
from et_ws import messages as messages

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Import alias does not rename original package


Import alias is same as original package name, thus making the alias unnecessary. This is probably not what's intended.

@codecov

codecov Bot commented Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@jayvdb
jayvdb marked this pull request as ready for review July 11, 2026 09:39
@jayvdb
jayvdb requested a review from pierre-tenedero July 11, 2026 09:39

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

The PR successfully implements the integration of osv-scanner for Python, Dart, and Java and migrates the repository to a workspace-based structure. While the Codacy analysis is up to standards and the security mitigation for the Rhino vulnerability (GHSA-3w8q-xq97-5j7x) is correctly implemented, there are significant issues with the newly introduced linting configurations.

Specifically, the no-line-length-in-comment Semgrep rule uses non-recursive globs, which prevents it from scanning the majority of the codebase. Additionally, the ls-lint configuration for .dart_tool directories requires restoration to prevent noise in local development environments. These issues should be addressed before merging to ensure the new standards are effectively enforced.

About this PR

  • Please update the PR description to document the architectural shift to workspaces and the implications of the Pyo3 and Deno upgrades. This context is vital for future maintenance.

Test suggestions

  • Verify osv-scanner execution includes all ecosystem lockfiles via the new vars.osv_locks variable.
  • Verify dart pub get at the workspace root correctly resolves dependencies for all four Dart members into a single lockfile.
  • Verify Semgrep rule no-line-length-in-comment correctly flags instances of hardcoded '120 chars' in comments.
  • Verify pyo3-runner build script correctly identifies the Python library directory using the new Pyo3 0.29 API.
  • Verify cargo deny check passes by correctly ignoring the Rhino vulnerability based on the provided justification.

TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback

Comment thread config/semgrep/no-line-length-in-comment.yaml
Comment thread config/ls-lint.yaml
- "**/.zig-cache"
- "**/zig-out"
# These dirs are created mid-run by parallel tasks, so they must be ignored by literal path, not glob.
# These dotnet dirs are created mid-run by parallel tasks, so they must be ignored by literal path, not glob.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 MEDIUM RISK

Restore the literal ignores for member-package .dart_tool directories and add an ignore for the workspace-root .dart_tool directory. This prevents ls-lint from walking generated directories and reporting false positives on artifacts that do not follow project casing rules.

Comment on lines 284 to 295
@@ -289,6 +290,8 @@ fn create_web_worker_cb(
stdio: Stdio::default(),
trace_ops: None,
unsafely_ignore_certificate_errors: None,
wait_for_debugger_on_start: false,
wait_for_page_wait_for_debugger: false,
};

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚪ LOW RISK

Suggestion: Consider using functional update syntax (..Default::default()) for the WebWorkerOptions instantiation. This eliminates the need for manual boilerplate when the Deno runtime introduces new optional configuration fields and confirms that None/false are appropriate defaults for this shim. Consistent with BootstrapOptions on line 268.

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The changes introduce Dart and Python workspace resolution, broaden dependency and vulnerability scanning, update lint and formatting policies, adjust CI checkout behavior, and modify several runner initialization and worker configuration paths.

Changes

Repository workspace and dependency resolution

Layer / File(s) Summary
Workspace resolution and lockfile handling
pubspec.yaml, pyproject.toml, services/ws-modules/..., .mise/config.dart.toml, .gitignore, .dockerignore, .codacy.yaml
Dart and Python workspace configuration now centralizes dependency resolution and updates handling of shared lockfiles and generated workspace artifacts.

Dependency and security configuration

Layer / File(s) Summary
Dependency pins and security scanning
.mise/config.toml, Cargo.toml, config/deny.toml, config/osv-scanner.toml, pom.xml
Dependency versions, advisory ignores, license allowances, and scanner inputs are updated across Rust, Python, Java, and multiple lockfile formats.

Formatting and policy configuration

Layer / File(s) Summary
Formatting and policy alignment
ruff.toml, config/semgrep/*, config/ls-lint.yaml, .editorconfig, .mise/config.*.toml, config/*, Dockerfile.nanoserver
Comments and analysis rules now reference editorconfig line length, Ruff coverage is expanded, directory matching is adjusted, and a rule detects hardcoded line-length wording.

CI and runtime behavior

Layer / File(s) Summary
CI and runner behavior
.github/workflows/coverage.yaml, services/ws-pyo3-runner/..., services/ws-web-runner/src/runtime.rs
Coverage checkout uses the pull request head SHA; runner initialization no longer retains host handles; worker debugger settings and build-script library-directory handling are explicit.

Python module cleanup

Layer / File(s) Summary
Python module compatibility cleanup
services/ws-modules/pyface1/pyface1/*
The Python export order is adjusted without changing exported names, and abstract collection imports move to collections.abc.

Estimated code review effort: 4 (Complex) | ~45 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is clearly related to the main change: expanding OSV scanning to cover uv, Dart, and Java lockfiles.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch vulns

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pom.xml`:
- Around line 76-87: Remove the direct org.mozilla:rhino override because it
does not affect TeaVM’s relocated Rhino classes. Update the TeaVM dependency or
otherwise use a patched/rebuilt teavm-relocated-libs-rhino artifact so the
plugin classpath contains the fixed Rhino implementation, and revise the
surrounding comment to reflect the actual remediation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e39c9e5a-dfad-4c8a-86f7-8a9bfc40f6de

📥 Commits

Reviewing files that changed from the base of the PR and between cd6c5bd and 882f466.

⛔ Files ignored due to path filters (8)
  • Cargo.lock is excluded by !**/*.lock
  • generated/.gitignore is excluded by !**/generated/**
  • generated/dart-rest/.gitignore is excluded by !**/generated/**
  • generated/dart-rest/pubspec.yaml is excluded by !**/generated/**
  • generated/dart-ws/pubspec.yaml is excluded by !**/generated/**
  • generated/python-ws/et_ws/__init__.py is excluded by !**/generated/**
  • pubspec.lock is excluded by !**/*.lock
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (39)
  • .codacy.yaml
  • .dockerignore
  • .editorconfig
  • .github/workflows/coverage.yaml
  • .gitignore
  • .mise/config.dart.toml
  • .mise/config.js.toml
  • .mise/config.maint.toml
  • .mise/config.python.toml
  • .mise/config.toml
  • Cargo.toml
  • Dockerfile.nanoserver
  • config/clang-format.yaml
  • config/conftest/policy/checksums/checksums.rego
  • config/conftest/policy/dockerfile/dockerfile.rego
  • config/conftest/policy/mise/mise.rego
  • config/deny.toml
  • config/dprint.jsonc
  • config/ls-lint.yaml
  • config/osv-scanner.toml
  • config/ryl.yaml
  • config/semgrep/comment-summary-line.yaml
  • config/semgrep/mise-config.yaml
  • config/semgrep/no-line-length-in-comment.yaml
  • pom.xml
  • pubspec.yaml
  • pyproject.toml
  • ruff.toml
  • services/ws-modules/dart-comm1/.gitignore
  • services/ws-modules/dart-comm1/pubspec.yaml
  • services/ws-modules/dart-data1/.gitignore
  • services/ws-modules/dart-data1/pubspec.yaml
  • services/ws-modules/pydata1/pyproject.toml
  • services/ws-modules/pyface1/pyface1/__init__.py
  • services/ws-modules/pyface1/pyface1/face_detection.py
  • services/ws-modules/pyface1/pyproject.toml
  • services/ws-pyo3-runner/build.rs
  • services/ws-pyo3-runner/python/echo.py
  • services/ws-web-runner/src/runtime.rs
💤 Files with no reviewable changes (3)
  • services/ws-modules/dart-comm1/.gitignore
  • config/semgrep/comment-summary-line.yaml
  • services/ws-modules/dart-data1/.gitignore

Comment thread pom.xml
Comment on lines +76 to +87
<!--
Force rhino to the patched 1.7.15.1 (CVE: high-CPU/DoS in toFixed). TeaVM 0.13.1 pulls rhino 1.7.15
transitively (teavm-core -> teavm-relocated-libs-rhino) onto this plugin's build classpath; overriding it
here bumps it without waiting for a TeaVM release. Drop this once teavm.version ships >= 1.7.15.1.
-->
<dependencies>
<dependency>
<groupId>org.mozilla</groupId>
<artifactId>rhino</artifactId>
<version>1.7.15.1</version>
</dependency>
</dependencies>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

set -euo pipefail
mvn -q help:effective-pom -Doutput=/tmp/effective-pom.xml
rg -n -C3 'teavm-relocated-libs-rhino|<artifactId>rhino</artifactId>|1\.7\.15' /tmp/effective-pom.xml

Repository: edge-toolkit/core

Length of output: 1940


🌐 Web query:

TeaVM 0.13.1 teavm-relocated-libs-rhino Rhino 1.7.15.1 dependency relocation

💡 Result:

In TeaVM, the teavm-relocated-libs-rhino artifact is a wrapper around the Rhino JavaScript engine that has been relocated to a different package namespace to prevent dependency conflicts (often referred to as "JAR hell") [1][2]. By relocating the org.mozilla packages to org.teavm.rhino, TeaVM ensures that it can bundle Rhino without interfering with other versions of Rhino that a project might already use as a dependency [1][3]. Regarding your query about version 0.13.1 and Rhino 1.7.15.1: 1. TeaVM 0.13.1 was released on February 22, 2026 [4]. 2. Rhino 1.7.15.1 is an existing version of the Rhino library [5]. TeaVM manages these dependencies through its build process, where it utilizes a relocation plugin to shadow the original Rhino classes into the org.teavm.rhino namespace [3]. When using TeaVM, you typically do not need to manually relocate these libraries yourself; instead, you rely on the teavm-relocated-libs-rhino artifact provided by the project to handle the namespace isolation automatically [1][6]. The TeaVM build configuration (such as in settings.gradle.kts) defines the relocation rules used for these internal libraries [3].

Citations:


🌐 Web query:

site:github.com/konsoletyper/teavm 0.13.1 teavm-relocated-libs-rhino rhino 1.7.15.1 pom

💡 Result:

teavm-relocated-libs-rhino is an internal artifact within the TeaVM project, a tool that compiles Java bytecode to JavaScript, WebAssembly, and C [1][2]. The artifact serves to manage dependencies by relocating them to avoid package conflicts [3]. Specifically, TeaVM uses the Rhino JavaScript engine to parse or process JavaScript code [4], and to maintain a clean dependency graph, it relocates the org.mozilla.javascript (Rhino) classes to the org.teavm.rhino package [3]. In the context of the version 0.13.1, the suffix indicates that this is a specific build or distribution of these relocated libraries designed to be used as a internal dependency by TeaVM's build process [3]. Users typically do not interact with this artifact directly; rather, it is handled automatically by the TeaVM build system (such as Gradle or Maven) when building projects that depend on TeaVM [3][1]. The Rhino version 1.7.15.1 referenced in your query is the underlying version of the Rhino library that has been relocated into the teavm-relocated-libs-rhino artifact for that release of TeaVM [3].

Citations:


🌐 Web query:

"teavm-relocated-libs-rhino" "1.7.15.1" TeaVM 0.13.1 pom

💡 Result:

The artifact teavm-relocated-libs-rhino is a specialized dependency used by the TeaVM project to package a relocated version of the Rhino JavaScript engine [1][2]. This relocation is performed to avoid dependency conflicts, commonly referred to as JAR hell, within projects that rely on TeaVM [1]. TeaVM version 0.13.1 was released on February 22, 2026 [3]. The artifact teavm-relocated-libs-rhino with versions corresponding to TeaVM releases (such as 0.13.1) typically packages a specific upstream version of Rhino [4]. Note that Rhino 1.7.15.1 is an official release from the Mozilla Rhino project, published on December 3, 2025 [5][6]. If you are looking for the Maven coordinates for a project using TeaVM 0.13.1, the relevant dependency would be defined in your pom.xml as follows: org.teavm teavm-relocated-libs-rhino 0.13.1 The version 0.13.1 of the relocated library aligns with the TeaVM release version [4][3], rather than the version of the underlying Rhino engine (1.7.15.1) [5]. You may use the upstream Rhino 1.7.15.1 dependency directly in your project if you do not require the relocated version used internally by TeaVM [7][5].

Citations:


This doesn't replace TeaVM's relocated Rhinoorg.mozilla:rhino:1.7.15.1 is a different artifact from org.teavm:teavm-relocated-libs-rhino, so it won't override the copy TeaVM puts on the plugin classpath. If the vulnerable classes come from TeaVM's relocated artifact, upgrade TeaVM or update/rebuild that artifact instead.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pom.xml` around lines 76 - 87, Remove the direct org.mozilla:rhino override
because it does not affect TeaVM’s relocated Rhino classes. Update the TeaVM
dependency or otherwise use a patched/rebuilt teavm-relocated-libs-rhino
artifact so the plugin classpath contains the fixed Rhino implementation, and
revise the surrounding comment to reflect the actual remediation.

@jayvdb
jayvdb merged commit 18dc4f9 into main Jul 11, 2026
39 checks passed
@jayvdb
jayvdb deleted the vulns branch July 11, 2026 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants